<!DOCTYPE html>
<html xmlns:v-bind="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
	<link rel="stylesheet" href="../../css/bootstrap.min.css">
	<link rel="stylesheet" href="../../css/font-awesome.min.css">
	<link rel="stylesheet" href="../../plugins/jqgrid/ui.jqgrid-bootstrap.css">
	<link rel="stylesheet" href="../../plugins/ztree/css/metroStyle/metroStyle.css">
	<link rel="stylesheet" href="../../css/bootstrap-table.min.css">
	<link rel="stylesheet" href="../../css/main.css">
	<link rel="stylesheet" href="../../plugins/treegrid/jquery.treegrid.css">

	<script src="../../libs/jquery.min.js"></script>
	<script src="../../plugins/layer/layer.js"></script>
	<script src="../../libs/bootstrap.min.js"></script>
	<script src="../../libs/vue.min.js"></script>
	<script src="../../libs/bootstrap-table.min.js"></script>
	<script src="../../plugins/treegrid/jquery.treegrid.min.js"></script>
	<script src="../../plugins/treegrid/jquery.treegrid.bootstrap3.js"></script>
	<script src="../../plugins/treegrid/jquery.treegrid.extension.js"></script>
	<script src="../../plugins/treegrid/tree.table.js"></script>
	<script src="../../plugins/jqgrid/grid.locale-cn.js"></script>
	<script src="../../plugins/jqgrid/jquery.jqGrid.min.js"></script>
	<script src="../../plugins/ztree/jquery.ztree.all.min.js"></script>
	<script src="../../js/common.js"></script>
	<!-- 注意， 只需要引用 JS，无需引用任何 CSS ！！！-->
	<script type="text/javascript" src="../../js/wangEditor.min.js"></script>
	<script type="text/javascript" src="../../js/jquery.base64.js"></script>
	<link rel="stylesheet" href="../userlist.css">
	<script src="../userlist.js"></script>


</head>
<body>
<div id="rrapp" v-cloak>
	<transition>
		<div id="users" v-show="usershow">

			<div id="userface">
				<div id="search">
					<div class="form-group col-xs-12 col-sm-8">
						<input type="text" class="form-control" v-model="username" @keyup.enter="queryuser" placeholder="用户名/id">
					</div>
					<a class="col-xs-12 col-sm-4 btn btn-default" @click="queryuser">查询</a>
				</div>
				<div id="userlist">
					<div id="list" class="list-group">
						<a href="#" id="all" class="list-group-item list-group-item-success" @click="queryprojectbyuser">全部用户</a>
						<a href="#" v-for="item in users.list" :value="item.userinfoid" class="list-group-item" @click="queryprojectbyuser"><span class="glyphicon glyphicon-user"></span>   {{item.useraccount}}</a>
					</div>
					<div id="loading" class="load-container">
						<div class="loader"></div>
						<p>加载中请稍后...</p>
						<!--<span class="glyphicon glyphicon-refresh"></span>-->
					</div>
				</div>
			</div>
			<div id="pagers">
				<ul class="pager">
					<li id="previous" class="previous disabled" @click="previous"><a href="#"><<</a></li>
					<li><span>第{{users.currPage}}页</span></li>
					<li id="next" class="next" @click="next"><a href="#">>></a></li>
				</ul>
			</div>
		</div>
	</transition>
	<div id="toggle">
		<div @click="ushow" id="togglebtn">
			<span class="glyphicon glyphicon-chevron-left"></span>
		</div>

	</div>

<div id="rrapp2" v-cloak>
	<div v-show="showList">
		<div class="grid-btn">
			<div class="form-group col-sm-2">
				<input type="text" class="form-control" v-model="searchParam" @keyup.enter="query" placeholder="项目名称">
			</div>
			<div class="form-group col-sm-2">
				<select class="form-control" v-model="searchType" placeholder="项目类型">
					<option value="">类型</option>
					<option value="0">工程</option>
					<option value="1">车队</option>
				</select>
			</div>
			<a class="btn btn-default" @click="query">查询</a>
			<a v-if="hasPermission('projectinfo:projectinfos:save')" class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
			<a v-if="hasPermission('projectinfo:projectinfos:update')" class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
			<a v-if="hasPermission('projectinfo:projectinfos:delete')" class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
		</div>
	    <table id="jqGrid"></table>
	    <div id="jqGridPager"></div>
    </div>
    
    <div id="desc" v-show="!showList" class="panel panel-default">
		<div class="panel-heading">{{title}}</div>
		<form class="form-horizontal">
			<div class="form-group" v-show="projectinfos.projectinfoid != null ? true : false">
			   	<div class="col-sm-2 control-label">项目ID</div>
			   	<div class="col-sm-10">
			      <input type="text" disabled="disabled" class="form-control" v-model="projectinfos.projectinfoid" placeholder="项目ID"/>
			    </div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">地区</div>
				<div class="col-sm-10">
					<input type="text" style="cursor:pointer" readonly="readonly" class="form-control" v-model="areainfos.parentname"  @click="menuTree" placeholder="地区"/>
				</div>
			</div>
			<div class="form-group">
			   	<div class="col-sm-2 control-label">发布者</div>
			   	<div class="col-sm-10">
			      <input type="text" style="cursor:pointer" readonly="readonly" @click="selectUser" class="form-control" v-model="userinfo.useraccount" placeholder="发布者"/>
			    </div>
			</div>
									<div class="form-group">
			   	<div class="col-sm-2 control-label">项目名称</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="projectinfos.projectname" placeholder="项目名称"/>
			    </div>
			</div>
            <div class="form-group">
                <div class="col-sm-2 control-label">项目详细</div>
                    <div class="col-sm-10">
                    <!--<textarea rows="5" cols="20" v-model="projectinfos.description" style="width: 150%;height: 150px" placeholder="项目详细">-->

                    <!--</textarea>-->
						<div id="editor" style="height:400px;max-height:500px;width: 190%">
						</div>
					</div>
			</div>

			<div class="form-group">
			   	<div class="col-sm-2 control-label">详细地址</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="projectinfos.detailedaddress" placeholder="详细地址"/>
			    </div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">项目人数</div>
				<div class="col-sm-10">
					<input type="number" class="form-control" v-model="projectinfos.peoplenum" placeholder="项目人数"/>
				</div>
			</div>
			<div class="form-group">
			   	<div class="col-sm-2 control-label">联系信息</div>
			   	<div class="col-sm-10">
					<textarea rows="5" cols="20" v-model="projectinfos.connection" style="width: 150%;height: 100px" placeholder="联系信息">

                    </textarea>
			    </div>
			</div>
			<div class="form-group" v-show="projectinfos.createtime == null ? false : true">
				<div class="col-sm-2 control-label">创建时间</div>
				<div class="col-sm-10">
					<input type="text" disabled="disabled" class="form-control" v-model="projectinfos.createtime" placeholder="创建时间"/>
				</div>
			</div>
			<div class="form-group" v-show="projectinfos.updatetime == null ? false : true">
				<div class="col-sm-2 control-label">更新时间</div>
				<div class="col-sm-10">
					<input type="text" disabled="disabled" class="form-control" v-model="projectinfos.updatetime" placeholder="更新时间"/>
				</div>
			</div>
			<div class="form-group">
			   	<div class="col-sm-2 control-label">浏览次数</div>
			   	<div class="col-sm-10">
			      <input type="number" class="form-control" v-model="projectinfos.viewtimes" placeholder="浏览次数"/>
			    </div>
			</div>
									<div class="form-group">
			   	<div class="col-sm-2 control-label">收藏次数</div>
			   	<div class="col-sm-10">
			      <input type="number" class="form-control" v-model="projectinfos.collecttimes" placeholder="收藏次数"/>
			    </div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">项目类型</div>
				<div class="col-sm-10">
					<select class="form-control" v-model="projectinfos.projecttype">
						<option value="0">工程</option>
						<option value="1">车队</option>
					</select>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">审核状态</div>
				<div class="col-sm-10">
					<select class="form-control" v-model="projectinfos.projectprogress">
						<!--<option v-for="item in projectinfos" :value="item.dictypeid">{{ item.typename }}</option>-->
						<option value="0">进行中</option>
						<option value="1">项目完成</option>
					</select>
				</div>
			</div>
			<div class="form-group" v-show="projectinfos.dealername != null ? true : false">
				<div class="col-sm-2 control-label">审核人</div>
				<div class="col-sm-10">
					<input type="text" disabled="disabled" class="form-control" v-model="projectinfos.dealername" placeholder="审核人"/>
				</div>
			</div>
			<div class="form-group" v-show="projectinfos.auditdate == null ? false : true">
				<div class="col-sm-2 control-label">审核时间</div>
				<div class="col-sm-10">
					<input type="text" disabled="disabled" class="form-control" v-model="projectinfos.auditdate" placeholder="创建时间"/>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">审核状态</div>
				<div class="col-sm-10">
					<select class="form-control" v-model="projectinfos.auditstatus">
						<!--<option v-for="item in projectinfos" :value="item.dictypeid">{{ item.typename }}</option>-->
						<option value="0">待审核</option>
						<option value="1">审核通过</option>
						<option value="2">审核失败</option>
					</select>
				</div>
			</div>

			<div class="form-group" v-show="reason()">
				<div class="col-sm-2 control-label">不通过原因</div>
				<div class="col-sm-10">
					<!--<input type="text" class="form-control" v-model="projectinfos.cannotpassreason" placeholder="不通过原因"/>-->
					<textarea rows="5" cols="20" v-model="projectinfos.cannotpassreason" style="width: 150%;height: 100px" placeholder="不通过原因">

                    </textarea>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">是否软删除</div>
				<label class="radio-inline">
					<input type="radio" name="status" value="0" v-model="projectinfos.isdel"/> 正常
				</label>
				<label class="radio-inline">
					<input type="radio"name="status" value="1" v-model="projectinfos.isdel"/> 删除
				</label>
			</div>
							<div class="form-group">
				<div class="col-sm-2 control-label"></div> 
				<input type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定"/>
				&nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
			</div>
		</form>
		<div v-show="false" id="selectUserID">
			<div class="form-group col-sm-2">
				<input type="text" class="form-control" v-model="selectUserSearchParam" @keyup.enter="selectUserQuery" placeholder="用户账户,用户ID">
			</div>
			<a class="btn btn-default" @click="selectUserQuery">查询</a>
			<table id="selectLayer"></table>
			<div id="selectLayerPager"></div>
		</div>
	</div>
</div>
</div>

<!-- 选择菜单 -->
<div id="menuLayer" style="display: none;padding:10px;">
	<ul id="menuTree" class="ztree"></ul>
</div>
<script src="../../js/modules/projectinfo/projectinfos.js"></script>
<script type="text/javascript">

</script>
</body>
</html>